Reporting Services Sample Scripts

© Copyright Microsoft Corporation, 2003. All rights reserved.

 
The SQL Server documentation team cannot answer technical support questions, but welcomes your suggestions and comments about this readme documentation. You can quickly and directly send e-mail feedback using the link below. All feedback must be in English. To submit written feedback about this document, click here:  Submit feedback.
 

This document contains the release information for the Reporting Services sample scripts. The following sections are included in this Readme:
Overview

The sample scripts represent scripts written for Reporting Services using Visual Basic .NET. Reporting Services scripts typically address a single feature or technology and are task-based. The script samples use the Reporting Services SOAP API and its Web service methods to accomplish specific management and administrative tasks on a report server. For more information about scripting in Reporting Services, see "Scripting with the RS Utility and the Web service" in Reporting Services Books Online.

Topics

The sample scripts include the following.

Location

This sample scripts are located in the Scripts subdirectory of the Reporting Services samples directory.

For Example:

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Scripts

Using the Sample Scripts

Scripts make administrative tasks easy, repeatable and maintainable. Reporting Service samples offers samples to show you how to write your own custom scripts.

To run the PublishSampleReports.rss sample script

  1. Open a command prompt: From the Start menu, click Run, type cmd in the text box, and then click OK.
  2. Navigate to the directory that contains your sample script. For example, if your sample script is installed in the default directory, type the following at the command prompt:
    cd C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Scripts
    
  3. At the command prompt, enter the following to see a list of command prompt options available for use with the rs utility:
    rs -?
    

    NOTE: If you receive a message that the rs argument is not recognized, you may need to add the location of Rs.exe to your Windows environment variable PATH.

  4. At the command prompt, type the following command to run the sample script file, which replaces the given server URL with the report server you are accessing:
    rs -i PublishSampleReports.rss -s http://myserver/reportserver -v parentFolder="Sample Reports"
    

    NOTE: The script contains a variable that is not explicitly declared in the script file. Instead, the sample relies on the use of the –v command to declare the parentFolder variable and assign it a value. The value that you supply to the variable corresponds to the folder that the script creates and uses to contain your published reports.

To run the CancelRunningJobs.rss sample script

  1. Open a command prompt: From the Start menu, click Run, type cmd in the text box, and then click OK.
  2. Navigate to the directory that contains your sample script. For example, if your sample script is installed in the default directory, type the following at the command prompt:
    cd C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Scripts
    
  3. At the command prompt, enter the following to see a list of command prompt options available for use with the rs utility:
    rs -?
    
    NOTE: If you receive a message that the rs argument is not recognized, you may need to add the location of Rs.exe to your Windows environment variable PATH.
  4. At the command prompt, type the following command to run the sample script file, which replaces the given server URL with the report server you are accessing:
    rs -i CancelRunningJobs.rss -s http://myserver/reportserver
    
Notes

For more detailed information about setting up and using the sample scripts, see "Sample Scripts" in Reporting Services Books Online.